package com.dream.cgomall.service.impl;

import com.dream.cgomall.entity.CgoRole;
import com.dream.cgomall.dao.CgoRoleDao;
import com.dream.cgomall.service.CgoRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (CgoRole)表服务实现类
 *
 * @author makejava
 * @since 2021-07-02 11:16:45
 */
@Service("cgoRoleService")
public class CgoRoleServiceImpl implements CgoRoleService {
    @Autowired(required = false)
    private CgoRoleDao cgoRoleDao;
    //添加权限（后台）
    @Override
    public int addRole(CgoRole cgoRole) {
        return cgoRoleDao.insert(cgoRole);
    }
    //删除权限（后台）
    @Override
    public int deleteRole(int id) {
        return cgoRoleDao.deleteById(id);
    }
}
